//
//  SelectAddressView.m
//  GoShop
//
//  Created by mac22 on 14/11/17.
//  Copyright (c) 2014年 郑朝军. All rights reserved.
//

#import "SelectAddressView.h"
#import "AddressScrollView.h"
#import "Grouble.h"

@implementation SelectAddressView
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self initView];
    }
    return self;
}

-(void)initView{
    
    UIView *maskView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight)];
    maskView.tag =99;
    maskView.backgroundColor = [UIColor blackColor];
    maskView.alpha = 0.6;
    [self addSubview:maskView];
    
    AddressScrollView * addressScrollView = [[AddressScrollView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight * 0.5)];
    
    
    self.addressScrollView.frame = CGRectMake(0, 0, self.frame.size.width, ScreenHeight/2);
    [self addSubview:addressScrollView];
    self.addressScrollView = addressScrollView;
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(maskViewClick)];
    tap.numberOfTapsRequired = 1;
    [maskView addGestureRecognizer:tap];
    
}

-(void)maskViewClick{
    if ([self.delegate respondsToSelector:@selector(removeMaskView)]) {
        [self.delegate removeMaskView];
    }
    
    
    
}


@end
